import request from '@/utils/request'
export default {
  // /api/OaOdLetter/add
  // 新增交办
  save(data){
    return request({
      url:`/OaOdLetter/add`,
      method:'post',
      data
    })
  },
  // /api/OaOdLetter/getMyBacklogList
  // 待办事项列表
  getMyBacklogList(page){
    return request({
      url:`/OaOdLetter/getMyBacklogList`,
      method:'get',
      params:{pageIndex:page.index,pageSize:page.size}
    })
  },
  ///api/OaOdLetter/getMyDoneList
  // 已办事项列表
  getMyDoneList(page){
    return request({
      url:`/OaOdLetter/getMyDoneList`,
      method:'get',
      params:{pageIndex:page.index,pageSize:page.size}
    })
  },

  ///OaOdLetter/getLiuChengJianKong
  // 流程监控
  getliouchongList(letterSource,letterTitle,letterType,pageIndex,pageSize){
    return request({
      url:`/OaOdLetter/getLiuChengJianKong`,
      method:'get',
      params:{letterSource,letterTitle,letterType,pageIndex,pageSize}
    })
  },




/*/api/OaOdLetter/handle
{
  "comments": "string",
  "letterId": "string"
}
交办督办办理*/
  handle(letter){
    return request({
      url:`/OaOdLetter/handle`,
      method:'post',
      data:letter
    })
  },
  doAudit(id,data){
    return request({
      url:`/OaOdLetter/handle/${id}`,
      method:'post',
      data:data
    })
  },
  // /OaOdLetter/info/{id}
  // 交办督办详情
  info(id){
    return request({
      url:`/OaOdLetter/info/${id}`,
      method:'get',
    })
  },
  // /OaOdLetter/piLiangGuiDang
  // 批量归档
  piLiangGuiDang(data){
    return request({
      url:`/OaOdLetter/piLiangGuiDang`,
      method:'put',
      data
    })
  }
}
